package com.lbd.dynamicCode.bean;

import com.lbd.base.bean.AbstractEntity;
import lombok.*;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.validation.constraints.NotNull;

/**
 * 用户表
 * Created by zzl on 2017/11/19
 */
@Getter
@Setter
//@ToString
@AllArgsConstructor
@NoArgsConstructor
@DynamicUpdate
@Entity
public class MsgUser extends AbstractEntity {

    // 用户名
    private String name;
    private String password;
    @NotNull(message = "手机号不能为空")
    //@Column(unique = true)
    //手机号
    private String telephone;
    // 前缀
    private String prefix;
    // 状态 1,启用2,禁用
    private Integer state;

    @Override
    public String toString() {
        return "MsgUser{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", telephone='" + telephone + '\'' +
                ", prefix='" + prefix + '\'' +
                ", state=" + state +
                '}';
    }
}
